using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using WebApiClientCore.Attributes;
using XUCore.WeChat.Apis;

namespace XUCore.WeChat.Enterprise.Apis.Token
{
    [HttpHost("https://qyapi.weixin.qq.com/cgi-bin/")]
    public interface IEnterpriseTokenApi : IWeChatApiBase
    {
        /// <summary>
        /// access_token获取接口
        /// https://developer.work.weixin.qq.com/document/path/91039
        /// </summary>
        /// <param name="corpid">企业ID，获取方式参考：术语说明-corpid</param>
        /// <param name="corpsecret">应用的凭证密钥，注意应用需要是启用状态，获取方式参考：术语说明-secret</param>
        /// <returns></returns>
        [HttpGet("gettoken")]
        Task<EnterpriseTokenApiResult> GetAsync([Required] string corpid, [Required] string corpsecret);
    }
}